| Conditions | 1 |
| Paths | 1 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | "use strict"; |
||
| 22 | module.exports = (attributeList, httpMethod = 'GET') => { |
||
| 23 | // Append queryString to default options |
||
| 24 | const optionList = Object.assign( |
||
| 25 | defaultOptionList, |
||
| 26 | { |
||
| 27 | method: httpMethod, |
||
| 28 | qs: attributeList |
||
| 29 | }); |
||
| 30 | |||
| 31 | return request(optionList) |
||
| 32 | .then(data => { |
||
| 33 | console.log(`data ${JSON.stringify(data)}`); |
||
|
|
|||
| 34 | }) |
||
| 35 | .catch(error => { |
||
| 36 | return Promise.reject(new NestedError('sarahClient error', error)); |
||
| 37 | }); |
||
| 38 | }; |
||
| 39 |